<?php
/**
 * 加解密-通用助手类
*/

namespace houze;

class Currency
{ 
    /**
     * AES加密方法
    */
    public static function set($config, $data) {  
        $config = \houze\Config::get($config);
        return openssl_encrypt($data, $config['aes_method'], $config['aes_key'], 0, $config['aes_iv']);  
    }  
  
    /**
     * AES解密方法
    */  
    public static function get($config, $data) {  
        $config = \houze\Config::get($config);
        return openssl_decrypt($data, $config['aes_method'], $config['aes_key'], 0, $config['aes_iv']);  
    } 
}